-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Add missing waitUntil method to FakeInvokedProcess #57030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 12.x
Are you sure you want to change the base?
Add missing waitUntil method to FakeInvokedProcess #57030
Conversation
|
||
/** | ||
* Wait until the given callback returns true. | ||
* | ||
* @param callable|null $output | ||
* @return \Illuminate\Process\ProcessResult | ||
*/ | ||
public function waitUntil(?callable $output = null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed from here. this wasn't included here for a reason i guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What can be removed from where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn’t have waitUntil
in the contract before but implemented in the real class. If there’s a specific reason it was left out, we can just remove it.
Why is |
totally missed this; thanks. pushed a changed. |
What if I invoke |
here's a commit for tests along with that for wait method too. |
Add missing waitUntil method to FakeInvokedProcess
Problem
The FakeInvokedProcess class was missing the waitUntil method that exists in InvokedProcess, causing test failures when using faked processes.
Solution
Added waitUntil method to both the contract interface and FakeInvokedProcess implementation with comprehensive tests.
Example
Before: This would fail with faked processes
Benefits